<?php
class Acteur {
	
	private $_id;
	private $_nom;
	private $_login;
	private $_password;
	private $_mission;
	private $_email;
	
	function __construct(){		
	}
	
	function creer(){
		$requet = "INSERT INTO `acteur` (`nom`, `login`, `password`, `mission`, `email`) VALUES";
		$requet .= " ('".$this->_nom."', '".$this->_login."', '".$this->_password."', '".$this->_mission."', '".$this->_email."')";
		$resultat = mysql_query($requet);
		return $resultat;
	}
	static function getAll()
	{
		$requet = "SELECT * FROM `acteur`";
		$resultat =  mysql_query($requet);
		return $resultat;	
	}
	static function get($id) {
		$requet = "SELECT * FROM `acteur` WHERE `id`=".$id;
		$resultat =  mysql_query($requet);
		return $resultat;
	}
	static function delete($id){
		$requet = "DELETE FROM `acteur` WHERE id=".$id;
		$resultat =  mysql_query($requet);
		return $resultat;
	}
		
	
	function getId(){
		return $this->_id;
	}
	function setId($_id){
		$this->_id = $_id;
	}
	
	function getNom(){
		return $this->_nom;
	}
	function setNom($_nom){
		$this->_nom = $_nom;
	}
	
	function getLogin(){
		return $this->_login;
	}
	function setLogin($_login){
		$this->_login = $_login;
	}
	
	function getPassword(){
		return $this->_password;
	}
	function setPassword($_password){
		$this->_password = $_password;
	}
	
	function getMission(){
		return $this->_mission;
	}
	function setMission($_mission){
		$this->_mission = $_mission;
	}
	function getEmail(){
		return $this->_email;
	}
	function setEmail($_email){
		$this->_email = $_email;
	}	
	
}
